int width = getSize().width; int height = getSize().height;
These statements get the width and height (in pixels) of the rectangle that the Web browser has allocated to the applet.
The width and height are needed to determine the size of the star that fits in the rectangle.
Next the applet sets the background color to white and the pen color to blue. The lines of the figure will be drawn with the pen.
To draw a symmetrical star, find the
minimum of the drawing area rectangle's
width and height.
Base the length of the radiating lines on this distance.
The length could be min/2
if all we were drawing
were the star, but let us make the length min/4
so that there is room for the rest of the snowflake.
Next the star is drawn in the center of the rectangle.
Fill in the blanks so that the center of the star is the center of the rectangle.